home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP Eylül 1998.iso / Slackwar / docs / mini / Linux+DOS+Win95+OS2 < prev    next >
Text File  |  1997-11-15  |  16KB  |  374 lines

  1.   The Linux ``Linux-DOS-Win95-OS2'' mini-HOWTO
  2.   Mike Harlan, r3mdh@raex.com
  3.   v1.3.1, 11 November 1997
  4.  
  5.   This document presents a procedure to make 4 operating systems co-
  6.   exist on a single hard disk.
  7.  
  8.      Disclaimer:
  9.         Any damages inflicted on any machine by you as a result of your
  10.         reading of this HOWTO is still YOUR FAULT. When you read about
  11.         deleting partitions and formatting disks, be smart.  Realize
  12.         that doing any of the above will result in loss of data.  So,
  13.         BACKUP SOON, BACKUP OFTEN.  This is your second-to-the-last
  14.         warning.
  15.  
  16.      Stuff to make the lawyers happy:
  17.         Unless otherwise stated, Linux HOWTO documents are copyrighted
  18.         by their respective authors. Linux HOWTO documents may be
  19.         reproduced and distributed in whole or in part, in any medium
  20.         physical or electronic, as long as this copyright notice is
  21.         retained on all copies.  Commercial redistribution is allowed
  22.         and encouraged; however, the author would like to be notified of
  23.         any such distributions.
  24.  
  25.         All translations, derivative works, or aggregate works
  26.         incorporating Linux HOWTO documents must be covered under this
  27.         copyright notice.  That is, you may not produce a derivative
  28.         work from a HOWTO and impose additional restrictions on its
  29.         distribution.  Exceptions to these rules may be granted under
  30.         certain conditions; please contact the Linux HOWTO coordinator
  31.         at the address given below.
  32.  
  33.         In short, we wish to promote dissemination of this information
  34.         through as many channels as possible. However, we do wish to
  35.         retain copyright on the HOWTO documents, and would like to be
  36.         notified of any plans to redistribute the HOWTOs.
  37.  
  38.         If you have any questions, please contact Greg Hankins, the
  39.         Linux HOWTO coordinator, at gregh@sunsite.unc.edu via email, or
  40.         at +1 404 853 9989.
  41.  
  42.      Updates from v1.3:
  43.  
  44.      ╖  Updated my e-mail address.  My address has changed from
  45.         r3mdh@imperium.net to r3mdh@raex.com.
  46.  
  47.      Updates from v1.0:
  48.  
  49.      ╖  Updated my e-mail address.  My address has changed from
  50.         r3mdh@dax.cc.uakron.edu to r3mdh@imperium.net.
  51.  
  52.   Now...........on with the show!
  53.  
  54.   1.  Introduction
  55.  
  56.   After many days of struggle and frustration, I finally figured out how
  57.   to accomplish what I wanted.  I have a 1.2GB HD and 16MB RAM PC.  I
  58.   wanted to have 4 operating systems on my system:  MSDOS v6.22, Windows
  59.   95, OS/2, and Linux.  Until now, I have found no Linux HOWTO to
  60.   perform the task of getting each and every one of these operating
  61.   systems on one machine and still have the ability to boot each (it is
  62.   possible to write the OSs to different partitions, but getting them to
  63.   boot and not hang at the ``Starting MSDOS'' message, for example, is
  64.   something that I had to figure out.  Well, after much trial and error,
  65.   I have come up with the following recipe to perform this feat:
  66.  
  67.   Before I begin going through the procedure step-by-step, let me first
  68.   clue you in on what I eventually wish to accomplish:
  69.  
  70.        <NAME>                      <SIZE>   <LABEL>  <PARTITION NUMBER>
  71.        ---------------------------------------------------------------------
  72.        MSDOS v6.22                   11MB   P1       Primary Partition 1
  73.        ---------------------------------------------------------------------
  74.        Windows '95                  350MB   P2       Primary Partition 2
  75.        ---------------------------------------------------------------------
  76.        OS/2 Boot Manager              2MB   P3       Primary Partition 3
  77.        ---------------------------------------------------------------------
  78.        DOS/Win Data                 511MB   E1       Primary Partition 4
  79.        OS/2 Warp 3.0                127MB   E2       Extended into 4 logical
  80.        Linux Slakware 3.2 Swap        XMB   E3       drives (sub-partitions)
  81.        Linux Slakware 3.2 Native  219-XMB   E4       labeled E1-E4
  82.        ---------------------------------------------------------------------
  83.  
  84.   What does all of this mean? Well, let me talk you through it.  First,
  85.   we need to use up all 4 partitions on our 1 harddrive.  Partitions 1
  86.   through 3 are PRIMARY partitions.  We will store MSDOS, Win95 and the
  87.   OS/2 Boot Manager (which inefficiently requires its OWN partition) on
  88.   these partitions, respectively. We then have 1 partition left.  But,
  89.   we want to have a drive just for DOS/Win95 data (this gives us a large
  90.   place to dump all of those ZIP files we so often download from the
  91.   Internet as well as a place to store Win95 programs and data that we
  92.   don't have enough room for on the Win95 partition), OS/2, and Linux
  93.   (both a Linux native as well as Linux swap partition).
  94.  
  95.   Now, I've been getting a lot of grief through e-mail lately about why
  96.   I have a separate partition for Win95 and one for DOS and one for
  97.   Win95/DOS data.  Here's my answer: having separate Win95 and DOS
  98.   partitions isn't for everyone.  Perhaps you don't even use DOS
  99.   anymore.  Perhaps Windows '95 is your answer for any software written
  100.   for a Microsoft platform. Well, there are some people out there who
  101.   still use DOS and can't live without it. Whether it's because DOS can
  102.   run 16-bit applications faster and more efficient, or because the
  103.   certain DOS program that you may use won't run under a Windows
  104.   environment (the Gravis Ultrasound soundcard setup program comes to
  105.   mind), you simply MUST be able to boot into DOS from time to time.
  106.   This HOWTO was written with those people in mind.  If you still have
  107.   difficulty swallowing the fact that the word ``MSDOS'' is included in
  108.   this HOWTO, then feel free to sit down and write a Linux-
  109.   Win95-OS/2-only HOWTO.  :)
  110.  
  111.   Now, back to the diagram above.  Like I said, we have 1 partition to
  112.   cram 4 things onto: DOS/Win data, OS/2, and Linux native & swap.  This
  113.   can be done by creating what are called logical drives (or logical
  114.   partitions, depending on which book you read) within the 1 primary
  115.   partition.  When we create these logical drives within a primary
  116.   partition, we refer to this primary partition as an EXTENDED PARTITION
  117.   (because it is extended beyond the scope of a single, primary
  118.   partition and instead contains up to 3 subpartitions (logical
  119.   drives)). Confused?  If so, you might want to read the OS/2 manual
  120.   about this topic. It will explain it better than I have here.
  121.  
  122.   Now, you might be scratching your head saying ``he wants to cram 4
  123.   things onto that extended partition, but he just got done saying we
  124.   can only have 3 subpartitions to put them on!''  This is true, at
  125.   least in MS-DOS's and OS/2's reasoning.  But, here one of the many
  126.   powerful advantages to Linux comes to save the day.  Linux can create
  127.   more than 3 subpartitions on an extended drive.  Just how many, I
  128.   don't know.  But, I know it can create at LEAST 4 (what we need).  So,
  129.   when we go through the steps of the installation procedure below, keep
  130.   in mind that when we create partitions using an MSDOS or OS/2 program,
  131.   we will only create 3 logical drives.  Then, when we go to Linux, we
  132.   will split one of them into two.  Essentially, you can think of it as
  133.   ``tricking'' MSDOS and OS/2 into seeing only 3 logical drives, but in
  134.   reality (and to Linux), there will be 4.
  135.  
  136.   2.  The Procedure
  137.  
  138.      NOTE:
  139.         Numbers in parentheses were the number of megabytes that I used
  140.         on my 1.2GB harddrive.
  141.  
  142.   Now, let's move on to the step-by-step procedure:
  143.  
  144.   1. Run view.exe on the Linux Slakware CD and create the Linux Boot and
  145.      Linux Root floppies.  For some reason, the Linux bootstrap program
  146.      calls the Root disk the Ramdisk floppy. I'll refer to this disk
  147.      from now on as the Ramdisk (Root) floppy.
  148.  
  149.   2. Backup any information that you wish to keep to tape (or whatever
  150.      media you have available to you).
  151.  
  152.   3. Boot your original MSDOS installation floppy, disk 1.
  153.  
  154.   4. When ``Starting MSDOS'' appears, press F5 to bypass config.sys and
  155.      autoexec.bat.
  156.  
  157.   5. Run a:\fdisk.exe.
  158.  
  159.   6. Delete all partitions (you have been warned: DELETING / MODIFYING
  160.      OF ANY PARTITION WILL RESULT IN THE LOSS OF ALL DATA ON THE DISK!).
  161.  
  162.   7. Add an MSDOS primary partition. (11MB)
  163.  
  164.   8. Format this partition.
  165.  
  166.   9. Run a:\setup.exe to install MSDOS on this partition.
  167.  
  168.   10.
  169.      Boot OS/2.
  170.  
  171.   11.
  172.      Select Advanced installation.
  173.  
  174.   12.
  175.      Run FDISK.  (this will eventually popup for you if you run through
  176.      the OS/2 installation)
  177.  
  178.   13.
  179.      Add 1 primary partition after the MSDOS one.  This will become our
  180.      Windows 95 partition. (349MB)
  181.  
  182.   14.
  183.      Add the Boot Manager to the next primary partition. (2MB)
  184.  
  185.   15.
  186.      Add an extended partition.
  187.  
  188.   16.
  189.      Add a logical drive to the extended partition.  This will become
  190.      the data portion of our MSDOS system. (511MB)
  191.   17.
  192.      Add another logical drive to the extended partition.  This will
  193.      become our OS/2 HPFS (``High Performance File System'') partition.
  194.      (127MB)
  195.  
  196.   18.
  197.      Add 1 last logical drive to the extended partition using the
  198.      remaining space on the drive.  This will later become 2 partitions
  199.      under Linux --- our swap partition and our native Linux partition.
  200.      But, since OS/2 (and DOS as well) can only write up to 6 partitions
  201.      per drive (3 primary and 3 logical drives housed within 1 extended
  202.      partition), we have to create only one at this time. And we DO have
  203.      to create this partition.  Don't leave this as free space and
  204.      expect Linux to be able to create the two partitions. Due to the
  205.      way that OS/2's FDISK works, where you add your last logical drive
  206.      to the extended partition marks the END of the extended partition.
  207.      You cannot add partitions beyond this point.  So, in other words,
  208.      creating this one last logical drive serves as a space-filler for
  209.      Linux. Later we will delete this partition and add 2 new ones in
  210.      the space that it once took up.
  211.  
  212.   19.
  213.      Add partitions 1, 2, and 5 to the Boot Manager.
  214.  
  215.   20.
  216.      Make partition 5 installable.
  217.  
  218.      Your FDISK screen should now look like this (or something like
  219.      this):
  220.  
  221.        ______________________________________________________________________
  222.  
  223.                                       FDISK
  224.  
  225.        Disk 1
  226.        ___________________________________________________________________________
  227.  
  228.        Partition Information
  229.        Name            Status          Access          FS Type         MBytes
  230.        ___________________________________________________________________________
  231.  
  232.        MSDOS           Bootable        C: Primary      FAT              11
  233.        WIN 95          Bootable         : Primary      FAT             350
  234.                        Startable        : Primary      BOOT MANAGER      2
  235.                        None            D: Logical      Unformatted     511
  236.        OS/2            Installable     E: Logical      FAT             127
  237.                        None            F: Logical      Unformatted     219
  238.  
  239.        ______________________________________________________________________
  240.  
  241.   21.
  242.      Continue on with the OS/2 installation process.
  243.  
  244.   22.
  245.      Reboot and select partition 2 (Windows 95) from the Boot Manager.
  246.  
  247.   23.
  248.      When the missing operating system error pops up, boot your MSDOS
  249.      installation disk.  We selected this partition in order to ``hide''
  250.      the MSDOS partition.  OS/2's Boot Manager is a bit strange. For
  251.      every bootable partition you have (in our case, MSDOS and OS/2),
  252.      you can have only one of them visible at a time. What this means is
  253.      that if you boot into one partition, MSDOS for example, the other
  254.      partition (Win95) is invisible. The MSDOS partition and Win95
  255.      essentially SHARE a drive letter. That's why under ``Access''
  256.      above, MSDOS has drive letter C and Win95 has no drive letter.
  257.      Under the current circumstances, MSDOS is visible with drive letter
  258.      C and Win95 is invisible with no drive letter. If we were to boot
  259.      Win95, the opposite would be true: MSDOS would be invisible with no
  260.      drive letter and Win95 would be visible with drive letter C.  An
  261.      invisible drive cannot be accessed AT ALL.  If you wish to copy
  262.      files between two drives in which only one can be visible at one
  263.      time, you must use a common (non-bootable) drive to swap files.  In
  264.      our case, the DOS/Win95 Data drive (drive D 511MB above) will serve
  265.      as this common drive. You might be asking ``Won't we eventually be
  266.      booting Linux also?''.  The answer is yes, we will. But let's not
  267.      get into that just yet.
  268.  
  269.   24.
  270.      Install MSDOS to Partition 2 (we'll need this in order to install
  271.      Windows 95).
  272.  
  273.   25.
  274.      Boot Partition 2.
  275.  
  276.   26.
  277.      Install Windows 95 to this partition (if you are running the
  278.      upgrade version of Win95, you may need to have your Win3.1
  279.      installation disk 1 ready to insert).
  280.  
  281.   27.
  282.      Boot Partition 1.
  283.  
  284.   28.
  285.      Format Partition 4.
  286.  
  287.   29.
  288.      Restore DOS data from tape (if any) to partitions 1 and 4.
  289.  
  290.   30.
  291.      Boot the Linux Boot Floppy.
  292.  
  293.   31.
  294.      Follow up with the Linux Ramdisk (Root) floppy.
  295.  
  296.   32.
  297.      When you log in as root and get to the # prompt, type ``fdisk'' and
  298.      press enter.
  299.  
  300.   33.
  301.      Delete the last partition (the one we created in step 18).
  302.  
  303.   34.
  304.      Add 1 16MB partition and tag it as filesystem type Linux Swap.
  305.      (17MB)
  306.  
  307.   35.
  308.      Add 1 last partition with the remaining cylinders on the disk and
  309.      tag this as filesystem type Linux native. (198MB)
  310.  
  311.   36.
  312.      Write the changes to the boot sector and reboot.
  313.  
  314.   37.
  315.      When you get to the # prompt again, run setup.
  316.  
  317.   38.
  318.      Install Linux to the last partition.
  319.  
  320.   39.
  321.      When you install LILO, be sure to install it to the root of the
  322.      last partition (NOT to the MBR, as you will destroy all of your
  323.      previous work in this HOWTO if you do so). Add only the last
  324.      partition to LILO and set the timer to zero. By doing this, when
  325.      you select Linux from the OS/2 Boot Manager, LILO will activate and
  326.      will then boot  Linux from the logical drive on the extended
  327.      partition. Since Linux is the only partition that we wish to
  328.      activate from LILO, we don't need a timer on it (unless you have
  329.      more than one Kernel that you wish to load.  In this case, you may
  330.      want to set the timer to something more than 0 seconds).
  331.  
  332.   40.
  333.      Activate the Linux swap partition (refer to the Linux Installation
  334.      and Getting Started Manual by Matt Welsh for this).
  335.  
  336.   41.
  337.      Boot OS/2.
  338.  
  339.   42.
  340.      Run FDISK.
  341.  
  342.   43.
  343.      Add Linux to the Boot Manager using the Linux NATIVE partition
  344.      (type 83 not 82!).
  345.  
  346.      Your FDISK screen should now look like this (or something like
  347.      this):
  348.  
  349.        ______________________________________________________________________
  350.  
  351.                                       FDISK
  352.  
  353.        Disk 1
  354.        ___________________________________________________________________________
  355.  
  356.        Partition Information
  357.        Name            Status          Access          FS Type         MBytes
  358.        ___________________________________________________________________________
  359.  
  360.        MSDOS           Bootable        C: Primary      FAT              11
  361.        WIN 95          Bootable         : Primary      FAT             350
  362.                        Startable        : Primary      BOOT MANAGER      2
  363.                        None            D: Logical      FAT             511
  364.        OS/2            Bootable        E: Logical      HPFS            127
  365.                        None             : Logical      Type 82          17
  366.        Linux           Bootable         : Logical      Type 83         198
  367.        ______________________________________________________________________
  368.  
  369.   Send any comments/suggestions/problems (as a last resort, please!)  to
  370.   me at r3mdh@raex.com.
  371.  
  372.   Mike Harlan, 11 NOV 1997
  373.  
  374.